package com.pet.server.dao.common;

import java.util.List;

import com.pet.server.po.Image;
import com.pet.system.statement.Statement;

public class ImageDao extends CommonDao {

	/**
	 * 调查
	 * @param id
	 * @return
	 */
	public List<Image> queryeOption(Integer id) {
		Statement stms = stmsFactory.createNativeStatement("select t.* from image t where t.oid="+id+" and t.type='product_info'");         
		//stms.addParam(id);
		stms.addEntity("t", Image.class);
		
		return query(stms);
	}
	/**
	 * 
	 * @param id
	 */
	public void deleteOid(Integer id) {
		String hql = "delete Image a where a.oid="+id+" and a.type='product_info'";
		System.out.println("hql==="+hql);
		update(hql);
		//delete(id);
	}

}
